package com.soul.quartz.ssm.service;


import com.soul.quartz.ssm.bean.JobEntity;
import org.quartz.JobKey;
import org.quartz.SchedulerException;

import java.util.List;
import java.util.Map;

public interface QuartzService {
    List<JobEntity> jobList() throws SchedulerException;

    void add(String cron, Class cls, String jobName, String jobGroup, String triggerName, String triggerGroup) throws SchedulerException;

    Map<String,String> getJob(JobKey jobKey) throws SchedulerException;

    boolean updateJob(String oldJobName, String oldJobGroup, String oldTriggerName, String oldTriggerGroup,
                      String jobName, String jobGroup, String triggerName, String triggerGroup, String cron, Class cls) throws SchedulerException;

    void pause(String jobName, String jobGroup) throws SchedulerException;

    void resume(String jobName, String jobGroup) throws SchedulerException;

    void delete(String jobName, String jobGroup, String triggerName, String triggerGroup) throws SchedulerException;

}
